﻿$(function () {
    //var terminalHub = $.connection.terminal;
    //// Start the connection
    //$.connection.hub.start();

    $('#console-line').keyup(function (event) {
        if (event.keyCode == 13) {
            var commandValue = $(this).val();
            var lastChild = $("#console-log:last-child");
            $('<p>' + commandValue + '</p>').appendTo($("#console-log"));

            //terminalHub.server.execute(commandValue);

            $.getScript('/base/terminal/execute/' + commandValue);
        }
    });

    var canvas = document.getElementById("canvas");
    var context = canvas.getContext("2d");

    context.clearRect(0, 0, 500, 170);
    context.fillStyle = "#ff00ff";
    context.fillRect(0, 0, 250, 250);
    //terminalHub.client.commandAction = function (inputScript) {
    //    console.log(inputScript);
    //    eval(inputScript);
    //}
});

